package com.wlf.spring.aware;

import org.springframework.context.support.GenericApplicationContext;

public class Application {

    public static void main(String[] args) {
        /**
         * aware 注入一些与容器相关的信息
         * beanNameAware
         * beanFactoryAware
         * ApplicationContentAware
         * EmbeddedValueResolverAware ${}
         */

        GenericApplicationContext context = new GenericApplicationContext();
        context.registerBean("myBean",MyBean.class);
        context.refresh();

        /**
         * 1,beanFactory 后处理器
         * 2,bean 后处理器
         * 3,初始化所有单例
         */
        context.close();
    }
}
